﻿using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;


namespace Vehicle.DAL
{
    /// <summary>
    /// Copyright (C) M-Tear团队
    /// 文 件 名：Log.cs
    /// 版    本：v1.00.0000
    /// 创建标识：2009-08-27   Created by 陈天铸 V1.00.0000
    /// 功能说明：Log表数据层类（继承于数据层基类Base_DAL.cs)
    /// 注意事项：无
    /// 
    /// 更新记录：
    /// 
    /// </summary>
   public  class Log:DAL.Base_DAL,Vehicle.Interface.ILog
    {
        /// <summary>
        /// 添加用户数据
        /// </summary>
        /// <param name="m_LogInfo">实体对象</param>
        public void Add(Model.LogInfo m_LogInfo)
        {
            string SpName = "Log_ADD";
            object[] _object = new object[] { 0, m_LogInfo.A_ID, m_LogInfo.L_Time,m_LogInfo.L_Note };
            SqlHelper.ExecuteNonQuery(SpName, _object);
        }
       /// <summary>
        /// 绑定页面Repeater控件
       /// </summary>
        /// <param name="Rept">Repeater控件对象</param>
        /// <param name="m_ComponentsInfo">系统通用实体层</param>
       public void RepeaterBind(Repeater Rept, Model.ComponentsInfo m_ComponentsInfo)
       {
          
           Rept.DataSource = GetAllSearch(new Model.ComponentsInfo(m_ComponentsInfo.startIndex, m_ComponentsInfo.endIndex, "Log", m_ComponentsInfo.condition, m_ComponentsInfo.result, m_ComponentsInfo.Tcondition, m_ComponentsInfo.Tresult, m_ComponentsInfo.Scondition, m_ComponentsInfo.Sresult, "L_Time", m_ComponentsInfo.StartTime, m_ComponentsInfo.EndTime, "L_ID")).DefaultView;
           Rept.DataBind();
       }
       /// <summary>
       /// 绑定页面DropDownList控件
       /// </summary>
       /// <param name="drop">添加用户数据对象</param>
       public void DropDownListBind(DropDownList drop)
       {
           drop.DataSource = GetModel(new Vehicle.Model.ComponentsInfo("Admin", "1","1","1","1","A_IsDelete","1","A_ID")).DefaultView;
           drop.DataTextField = "A_Name";//显示的名称
           drop.DataValueField = "A_ID";//数据值
           drop.DataBind();
           drop.Items.Add(new ListItem("全部", "0"));
           drop.SelectedValue = "0";  //默认选择全部
       }
    }
}
